package com.example.yskjproject.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class UserWallet implements Parcelable {
    private int id;
    @SerializedName("user_id")
    private int userId;
    private int balance;
    private int pending;
    @SerializedName("freeze_balance")
    private int  freezeBalance;
    @SerializedName("virtual_coin")
    private int  virtualCoin;
    private int status;
    @SerializedName("withdrawal_toal")
    private int withdrawalToal;
    @SerializedName("balance_total")
    private int balanceTotal;


    public UserWallet() {}


    protected UserWallet(Parcel in) {
        id = in.readInt();
        userId = in.readInt();
        balance = in.readInt();
        pending = in.readInt();
        freezeBalance = in.readInt();
        virtualCoin = in.readInt();
        status = in.readInt();
        withdrawalToal = in.readInt();
        balanceTotal = in.readInt();
    }

    public static final Creator<UserWallet> CREATOR = new Creator<UserWallet>() {
        @Override
        public UserWallet createFromParcel(Parcel in) {
            return new UserWallet(in);
        }

        @Override
        public UserWallet[] newArray(int size) {
            return new UserWallet[size];
        }
    };

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public int getPending() {
        return pending;
    }

    public void setPending(int pending) {
        this.pending = pending;
    }

    public int getFreezeBalance() {
        return freezeBalance;
    }

    public void setFreezeBalance(int freezeBalance) {
        this.freezeBalance = freezeBalance;
    }

    public int getVirtualCoin() {
        return virtualCoin;
    }

    public void setVirtualCoin(int virtualCoin) {
        this.virtualCoin = virtualCoin;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getWithdrawalToal() {
        return withdrawalToal;
    }
    public void setWithdrawalToal(int withdrawalToal) {
        this.withdrawalToal = withdrawalToal;
    }
    public int getBalanceTotal() {
        return balanceTotal;
    }

    public void setBalanceTotal(int balanceTotal) {
        this.balanceTotal = balanceTotal;
    }




    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(userId);
        dest.writeInt(balance);
        dest.writeInt(pending);
        dest.writeInt(freezeBalance);
        dest.writeInt(virtualCoin);
        dest.writeInt(status);
        dest.writeInt(withdrawalToal);
        dest.writeInt(balanceTotal);
    }
}
